// class.js
Page({
  data: {
    movieOnInfoList:[],
    movieComingList:[],
    cinemaList:[]
  },
  onShow(){
    //获取电影列表
    let allMovies = getApp().globalData.movieList;
    let movieOnInfoList = allMovies.filter(item=>item.isMovieOn==true)
    this.setData({movieOnInfoList:[]});
    this.setData({movieOnInfoList});
    let movieComingList = allMovies.filter(item=>item.isMovieOn==false)
    this.setData({movieComingList:[]});
    this.setData({movieComingList});
    let cinemaList = getApp().globalData.cinemaList;
    this.setData({cinemaList});
  },
  toPath(e){
    wx.navigateTo({
      url: '/pages/detailMovie/detailMovie?id='+e.currentTarget.dataset.id,
    })
  },
  toOtherPath(e){
    console.log(e)
    wx.navigateTo({
      url: '/packageC/pages/detailTheater/detailTheater?id='+e.currentTarget.dataset.id,
    })
  },
  onShareAppMessage: function (res){
    return {
      title: '电影之家',
      path: '/pages/class/class'
    }
  },
})
